﻿using System.Threading.Tasks;
using Mediator;
using Microsoft.Extensions.Logging;

namespace Iot.Shared.EventBusSend;

public class EventBusSendMediator(IPublisher publisher, ILogger<EventBusSendMediator> logger) : IEventBusSend
{
    ValueTask IEventBusSend.ProtectedSend<T>(T data)
    {
        logger.LogTrace("下发数据:{数据}", data);
        return publisher.Publish(data);
    }
}